<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>

<link rel="stylesheet" type="text/css" href="../static/choujiang/css/reset.css" />

<style>
            .hide{
                display: none;
            }
            .box{
                position:relative;
                max-width:750px;
                margin:0 auto;
            }
            .box .g-lottery-box{
                position:absolute;
                width:80%;
                left:10%;
                border-radius: 50%;
            }
            .box .g-lottery-img{
                position: absolute;
                width:68%;
                left:16%;
                margin-top:6%;
            }
            .box .playbtn {
                position: absolute;
                width: 20%;
                margin-top: 30%;
                left: 40%;
            }
            .box .login{
                position: absolute;
                margin-top: 81%;
                width: 100%;
                background-color: #AEAEAE;
                text-align: center;
            }
            .box .register{
                position: absolute;
                margin-top: 81%;
                width: 100%;
                background-color: #b9def0;
                text-align: center;
            }
            .text,.s_text {
                font-family: 'Lato', sans-serif;
                width: 420px;
                padding: 10px 10px 10px 10px;
                color: #fff;
                font-size: 16px;
                outline: none;
                background: none;
                font-weight: 100;
                border-radius: 50em;
                -webkit-border-radius: 50em;
                border: 1px solid#fff;
                margin-bottom: 1em;
                text-align: center;
            }
            .password,.s_password{
                font-family: 'Lato', sans-serif;
                width: 420px;
                padding: 10px 10px 10px 10px;
                color: #fff;
                font-size: 16px;
                outline: none;
                background: none;
                font-weight: 100;
                border-radius: 50em;
                -webkit-border-radius: 50em;
                border: 1px solid#fff;
                margin-bottom: 1em;
                text-align: center;
            }
            .submit{
                font-family: 'Lato', sans-serif;
                font-size: 22px;
                font-weight: 100;
                color: #fff;
                cursor: pointer;
                outline: none;
                padding: 10px 10px 10px 10px;
                width: 420px;
                background: skyblue;
                border-radius: 50em;
                -webkit-border-radius: 50em;
                border: none;
                text-align: center;
            }
            h1 {
                font-family: 'Calligraffitti', cursive;
                padding-top: 1em;
                text-align: center;
                font-size: 2em;
                color: darkgreen;
            }
            h3 {
                font-family: 'Calligraffitti', cursive;
                padding-top: 1em;
                text-align: center;
                font-size: 2em;
                color: darkgreen;
            }
            #lh2{
                font-family: 'Calligraffitti', cursive;
                text-align: center;
                font-weight:100;
                font-size: 4em;
                color: #fff;
            }
              #rh2{
                font-family: 'Calligraffitti', cursive;
                padding-top: 20px;
                padding-bottom: 20px;
                text-align: center;
                font-weight:100;
                font-size: 4em;
                color: #fff;
            }
            .inputPhone{
                font-family: 'Calligraffitti', cursive;
                padding-right: 0.5em;
                text-align: center;
                font-size: 2em;
                color: #fff;
            }
            .inputPwd{
                font-family: 'Calligraffitti', cursive;
                padding-right: 0.8em;
                text-align: center;
                font-size: 2em;
                color: #fff;
            }
            #msg,#r_msg{
                color: red;
                font-size:larger;
            }
            .L2R ,.R2L,.L2P{
                width: 114px;
                height: 40px;
                line-height: 40px;
                font-size: 22px;
                background-color: red;
                color: white;
            }
            /*.L2P{*/
                /*width: 114px;*/
                /*height: 40px;*/
                /*line-height: 40px;*/
                /*font-size: 22px;*/
                /*background-color: red;*/
                /*color: white;*/
            /*}*/
            .col-login{
                font-family: 'Calligraffitti', cursive;
                padding-right: 0.8em;
                text-align: center;
                font-size: 2em;
                color: darkgreen;
            }
            .input-login{

            }

            @media (max-width: 1280px) {
	input[type="text"], input[type="password"] {
		width: 340px;
	}

	input[type="submit"] {
		width: 340px;
	}
    input[type="button"] {
		width: 340px;
	}

	.add-photo h4 {
		padding: 29px 29px;
		width: 14%;
		margin: 0 auto 8%;
	}
}

@media (max-width: 1024px) {
	.login-form {
		width: 41.3333%;
	}


	.add-photo h4 {
		padding: 18px 20px;
		width: 14%;
		margin: 0 auto 6%;
	}
}

@media (max-width: 768px) {

	.head-info h2 {
		width: 90%;
	}

	.copy-rights {
		padding: 0;
		margin: 1em 0;
	}
}

@media (max-width: 667px) {
	input[type="text"], input[type="password"] {
		width: 292px;
	}

	input[type="submit"] {
		width: 292px;
	}
    input[type="button"] {
		width: 292px;
	}
}

@media (max-width: 640px) {
	.login-form {
		width: 66%;
	}

	.login-form-1 {
		width: 66%;
	}
}

@media (max-width: 568px) {
	h1 {
		text-align: center;
		margin-top: 1em;
		font-size: 1.6em;
		color: #fff;
	}

	input[type="text"], input[type="password"] {
		width: 285px;
	}

	input[type="submit"] {
		width: 285px;
	}
    input[type="button"] {
		width: 285px;
	}
	.add-photo h4 {
		padding: 18px 18px;
		width: 17%;
		margin: 0 auto 6%;
	}
}

@media (max-width: 480px) {
	.head-info h3 {
		width: 91%;
	}

	.head-info h1 {
		height: 60px;
		font-size: 3em;
	}
}

@media (max-width: 375px) {
	input[type="text"], input[type="password"] {
		width: 248px;
	}

	input[type="submit"] {
		width: 248px;
	}
    input[type="button"] {
		width: 248px;
	}

	.add-photo h4 {
		width: 18%;
	}

}

@media (max-width: 384px) {
	input[type="text"], input[type="password"] {
		width: 265px;
	}

	input[type="submit"] {
		width: 265px;
	}
    input[type="button"] {
		width: 265px;
	}
}

@media (max-width: 320px) {
	input[type="text"], input[type="password"] {
		width: 222px;
		padding: 10px 10px 10px 10px;
	}

	input[type="submit"] {
		width: 222px;
		padding: 10px 10px 12px 10px;
		font-size: 18px;
	}
    input[type="button"] {
		width: 222px;
        padding: 10px 10px 10px 10px;
	}

	.head-info h3 {
		width: 92%;
		padding: 2em 0 1.2em 0;
		font-size: 14px;
	}



	.head-info h2 {
		height: 35px;
		font-size: 2.1em;
		padding-top: 18px;
	}

	.add-photo h4 {
		padding: 11px 5px;
		width: 18%;
		margin: 0 auto 6%;
		font-size: 14px;
	}
	h1 {
		margin-top: 1em;
		font-size: 1.3em;
	}
}
		</style>

</head>

<body>
<span class="total" id="total">{{total}}</span>
<!--modal抽奖部分-->
<div id="modal" class="box modal">
    <div>
	<img src="../static/choujiang/img/lypnt_500.gif" class="g-lottery-box" alt="">
	<img src="../static/choujiang/img/off_big_440.png" class="g-lottery-img" alt="">
	<img src="../static/choujiang/img/playbtn.png" class="playbtn" >
    </div>
    <div class="login" id="login">
    <!--<input type="button" style="background-color: #b9def0;width: 100px;height: 50px;" value="BACK" onclick="cancleShadow()"/>-->
        <h1>恭喜您获得<span id="discount" style="color: red">0%</span>的优惠奖励，优惠后价格<span style="color: red">¥</span> <span id="after_price" style="color: red">0.00</span>
        ，请登录会员结算。</h1>
        <h2 id="lh2">welcome</h2>
           <!--<span class="inputPhone">Phone:</span><input type="text" class="text" value="Phone" onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = 'Phone';}"></br>-->
           <div class="col-login">Phone</div>
           <div class="input-login"><input type="text" class="text" name="phone" id="phone"></div>
           <div class="col-login">Password</div>
           <div class="input-login"><input type="password" class="password" name="pwd" id="pwd"></div>
           <input type="button" class="submit" onclick="myFunction()" value="Login">
        <h3>Not a member ? Please <a  class="L2R"  onclick="myRigster()">Rigster</a>  or  <a  class="L2P"  onclick="myFunction()">Check</a></h3></br>
        <span id="msg">*</span>


    </div>
    <div class="register hide" id="register">
    <!--<input type="button" style="background-color: #b9def0;width: 100px;height: 50px;" value="BACK" onclick="cancleShadow()"/>-->

        <h2 id="rh2">SIGN IN</h2>
        <div class="col-login">Phone</div>
        <div class="input-login"><input type="text" class="text" name="phone" id="r_phone"></div>
        <div class="col-login">Password</div>
        <div class="input-login"><input type="password" class="password" name="pwd" id="r_pwd"></div>
         <input type="button" class="submit" onclick="myRFunction()" value="Register">
        <h3> A member ? Please <a class="R2L" onclick="myLogin()">Login</a></h3></br>
        <span id="r_msg">*</span>


    </div>
</div>





<script type="text/javascript" src="../static/diancan/js/jquery-1.7.1.min.js"></script>

<script>
$(function(){
     s=$('#total').html()
var $btn = $('.playbtn');
				var playnum = 50; //初始次数，由后台传入
				$('.playnum').html(playnum);
				var isture = 0;

				var clickfunc = function() {
				    if(s<=15){
					var data = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,
                        1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,2,2,2,2,
                        2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,4,4,5,5,
                        6, 7, 8,9, 10];}
                    if(15<s<=100){
				    var data = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
                        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,
                        3,3,3,3,3,3,3,3,3,4,4,4,4,4,5,5,5,6,6,7,8,9,10];
                    }
                    if(s>100){
                    var data = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
                        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
                        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
                        2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,
                        4,4, 5,5,5,5,6,6,6,7,7,8,9,10];
                    }

					//data为随机出来的结果，根据概率后的结果
					data = data[Math.floor(Math.random() * data.length)];
					switch(data) {
						case 1:
							rotateFunc(1, 18, '折扣5%');
                            setTimeout("$('.login #discount').html('5%')",4000);
							setTimeout("$('.login #after_price').html((0.95*s).toFixed(2))",4000);
							break;
                        case 2:
							rotateFunc(2, 56, '折扣10%');
							setTimeout("$('.login #discount').html('10%')",4000);
							setTimeout("$('.login #after_price').html((0.9*s).toFixed(2))",4000);
							break;
						case 3:
							rotateFunc(3, 92, '折扣15%');
							setTimeout("$('.login #discount').html('15%')",4000);
							setTimeout("$('.login #after_price').html((0.85*s).toFixed(2))",4000);
							break;
						case 4:
							rotateFunc(4, 128, '折扣20%');
							setTimeout("$('.login #discount').html('20%')",4000);
							setTimeout("$('.login #after_price').html((0.80*s).toFixed(2))",4000);
							break;
						case 5:
							rotateFunc(5, 164, '折扣25%');
							setTimeout("$('.login #discount').html('25%')",4000);
							setTimeout("$('.login #after_price').html((0.75*s).toFixed(2))",4000);
							break;
						case 6:
							rotateFunc(6, 200, '折扣30%');
							setTimeout("$('.login #discount').html('30%')",4000);
							setTimeout("$('.login #after_price').html((0.70*s).toFixed(2))",4000);
							break;
                        case 7:
							rotateFunc(7, 236, '折扣35%');
							setTimeout("$('.login #discount').html('35%')",4000);
							setTimeout("$('.login #after_price').html((0.65*s).toFixed(2))",4000);
							break;
						case 8:
							rotateFunc(8, 272, '折扣40%');
							setTimeout("$('.login #discount').html('40%')",4000);
							setTimeout("$('.login #after_price').html((0.60*s).toFixed(2))",4000);
							break;
						case 9:
							rotateFunc(9, 308, '折扣45%');
							setTimeout("$('.login #discount').html('45%')",4000);
							setTimeout("$('.login #after_price').html((0.55*s).toFixed(2))",4000);
							break;
						case 10:
							rotateFunc(10, 344, '折扣50%');
							setTimeout("$('.login #discount').html('50%')",4000);
							setTimeout("$('.login #after_price').html((0.50*s).toFixed(2))",4000);
							break;
					}
				};

				$btn.click(function() {
					if(isture) return; // 如果在执行就退出
					isture = true; // 标志为在执行
					//先判断是否登录,未登录则执行下面的函数
					if(1 == 2) {
						$('.playnum').html('0');
						alert("请先登录");
						isture = false;
					} else { //登录了就执行下面
						if(playnum <= 0) { //当抽奖次数为0的时候执行
							alert("没有次数了");
							$('.playnum').html(0);
							isture = false;
						} else { //还有次数就执行
							playnum = playnum - 1; //执行转盘了则次数减1
							if(playnum <= 0) {
								playnum = 0;
							}
							$('.playnum').html(playnum);
							clickfunc();
						}
					}
				});
				var rotateFunc = function(awards, angle, text) {
					isture = true;
					$btn.stopRotate();
					$btn.rotate({
						angle: 0,
						duration: 4000, //旋转时间
						animateTo: angle + 1440, //让它根据得出来的结果加上1440度旋转
						callback: function() {
							isture = false; // 标志为 执行完毕
                           // if (awards==7){
                           // }
						}
					});
				};
})
function myRigster() {
    $("#login").addClass("hide")
    $("#register").removeClass("hide")
}
function myLogin() {
    $("#register").addClass("hide")
    $("#login").removeClass("hide")
}

</script>

<script>
        $(function (k) {
    for (var d, f, l = document.getElementsByTagName("head")[0].style, h = ["transformProperty", "WebkitTransform", "OTransform", "msTransform", "MozTransform"], g = 0; g < h.length; g++)void 0 !== l[h[g]] && (d = h[g]);
    d && (f = d.replace(/[tT]ransform/, "TransformOrigin"), "T" == f[0] && (f[0] = "t"));
    eval('IE = "v"=="\v"');
    jQuery.fn.extend({
        rotate: function (a) {
            if (0 !== this.length && "undefined" != typeof a) {
                "number" == typeof a && (a = {angle: a});
                for (var b = [], c = 0, d = this.length; c < d; c++) {
                    var e = this.get(c);
                    if (e.Wilq32 && e.Wilq32.PhotoEffect) e.Wilq32.PhotoEffect._handleRotation(a);
                    else {
                        var f = k.extend(!0, {}, a), e = (new Wilq32.PhotoEffect(e, f))._rootObj;
                        b.push(k(e))
                    }
                }
                return b
            }
        }, getRotateAngle: function () {
            for (var a = [], b = 0, c = this.length; b < c; b++) {
                var d = this.get(b);
                d.Wilq32 && d.Wilq32.PhotoEffect && (a[b] = d.Wilq32.PhotoEffect._angle)
            }
            return a
        }, stopRotate: function () {
            for (var a = 0, b = this.length; a < b; a++) {
                var c = this.get(a);
                c.Wilq32 && c.Wilq32.PhotoEffect && clearTimeout(c.Wilq32.PhotoEffect._timer)
            }
        }
    });
    Wilq32 = window.Wilq32 || {};
    Wilq32.PhotoEffect = function () {
        return d ? function (a, b) {
            a.Wilq32 = {PhotoEffect: this};
            this._img = this._rootObj = this._eventObj = a;
            this._handleRotation(b)
        } : function (a, b) {
            this._img = a;
            this._onLoadDelegate = [b];
            this._rootObj = document.createElement("span");
            this._rootObj.style.display = "inline-block";
            this._rootObj.Wilq32 = {PhotoEffect: this};
            a.parentNode.insertBefore(this._rootObj, a);
            if (a.complete) this._Loader(); else {
                var c = this;
                jQuery(this._img).bind("load", function () {
                    c._Loader()
                })
            }
        }
    }();
    Wilq32.PhotoEffect.prototype = {
        _setupParameters: function (a) {
            this._parameters = this._parameters || {};
            "number" !==
            typeof this._angle && (this._angle = 0);
            "number" === typeof a.angle && (this._angle = a.angle);
            this._parameters.animateTo = "number" === typeof a.animateTo ? a.animateTo : this._angle;
            this._parameters.step = a.step || this._parameters.step || null;
            this._parameters.easing = a.easing || this._parameters.easing || this._defaultEasing;
            this._parameters.duration = a.duration || this._parameters.duration || 1E3;
            this._parameters.callback = a.callback || this._parameters.callback || this._emptyFunction;
            this._parameters.center = a.center || this._parameters.center ||
                ["50%", "50%"];
            this._rotationCenterX = "string" == typeof this._parameters.center[0] ? parseInt(this._parameters.center[0], 10) / 100 * this._imgWidth * this._aspectW : this._parameters.center[0];
            this._rotationCenterY = "string" == typeof this._parameters.center[1] ? parseInt(this._parameters.center[1], 10) / 100 * this._imgHeight * this._aspectH : this._parameters.center[1];
            a.bind && a.bind != this._parameters.bind && this._BindEvents(a.bind)
        }, _emptyFunction: function () {
        }, _defaultEasing: function (a, b, c, d, e) {
            return -d * ((b = b / e - 1) * b * b * b -
                1) + c
        }, _handleRotation: function (a, b) {
            d || this._img.complete || b ? (this._setupParameters(a), this._angle == this._parameters.animateTo ? this._rotate(this._angle) : this._animateStart()) : this._onLoadDelegate.push(a)
        }, _BindEvents: function (a) {
            if (a && this._eventObj) {
                if (this._parameters.bind) {
                    var b = this._parameters.bind, c;
                    for (c in b)b.hasOwnProperty(c) && jQuery(this._eventObj).unbind(c, b[c])
                }
                this._parameters.bind = a;
                for (c in a)a.hasOwnProperty(c) && jQuery(this._eventObj).bind(c, a[c])
            }
        }, _Loader: function () {
            return IE ? function () {
                var a =
                    this._img.width, b = this._img.height;
                this._imgWidth = a;
                this._imgHeight = b;
                this._img.parentNode.removeChild(this._img);
                this._vimage = this.createVMLNode("image");
                this._vimage.src = this._img.src;
                this._vimage.style.height = b + "px";
                this._vimage.style.width = a + "px";
                this._vimage.style.position = "absolute";
                this._vimage.style.top = "0px";
                this._vimage.style.left = "0px";
                this._aspectW = this._aspectH = 1;
                this._container = this.createVMLNode("group");
                this._container.style.width = a;
                this._container.style.height = b;
                this._container.style.position =
                    "absolute";
                this._container.style.top = "0px";
                this._container.style.left = "0px";
                this._container.setAttribute("coordsize", a - 1 + "," + (b - 1));
                this._container.appendChild(this._vimage);
                this._rootObj.appendChild(this._container);
                this._rootObj.style.position = "relative";
                this._rootObj.style.width = a + "px";
                this._rootObj.style.height = b + "px";
                this._rootObj.setAttribute("id", this._img.getAttribute("id"));
                this._rootObj.className = this._img.className;
                for (this._eventObj = this._rootObj; a = this._onLoadDelegate.shift();)this._handleRotation(a,
                    !0)
            } : function () {
                this._rootObj.setAttribute("id", this._img.getAttribute("id"));
                this._rootObj.className = this._img.className;
                this._imgWidth = this._img.naturalWidth;
                this._imgHeight = this._img.naturalHeight;
                var a = Math.sqrt(this._imgHeight * this._imgHeight + this._imgWidth * this._imgWidth);
                this._width = 3 * a;
                this._height = 3 * a;
                this._aspectW = this._img.offsetWidth / this._img.naturalWidth;
                this._aspectH = this._img.offsetHeight / this._img.naturalHeight;
                this._img.parentNode.removeChild(this._img);
                this._canvas = document.createElement("canvas");
                this._canvas.setAttribute("width", this._width);
                this._canvas.style.position = "relative";
                this._canvas.style.left = -this._img.height * this._aspectW + "px";
                this._canvas.style.top = -this._img.width * this._aspectH + "px";
                this._canvas.Wilq32 = this._rootObj.Wilq32;
                this._rootObj.appendChild(this._canvas);
                this._rootObj.style.width = this._img.width * this._aspectW + "px";
                this._rootObj.style.height = this._img.height * this._aspectH + "px";
                this._eventObj = this._canvas;
                for (this._cnv = this._canvas.getContext("2d"); a = this._onLoadDelegate.shift();)this._handleRotation(a,
                    !0)
            }
        }(), _animateStart: function () {
            this._timer && clearTimeout(this._timer);
            this._animateStartTime = +new Date;
            this._animateStartAngle = this._angle;
            this._animate()
        }, _animate: function () {
            var a = +new Date, b = a - this._animateStartTime > this._parameters.duration;
            if (b && !this._parameters.animatedGif) clearTimeout(this._timer); else {
                if (this._canvas || this._vimage || this._img) a = this._parameters.easing(0, a - this._animateStartTime, this._animateStartAngle, this._parameters.animateTo - this._animateStartAngle, this._parameters.duration),
                    this._rotate(~~(10 * a) / 10);
                this._parameters.step && this._parameters.step(this._angle);
                var c = this;
                this._timer = setTimeout(function () {
                    c._animate.call(c)
                }, 10)
            }
            this._parameters.callback && b && (this._angle = this._parameters.animateTo, this._rotate(this._angle), this._parameters.callback.call(this._rootObj))
        }, _rotate: function () {
            var a = Math.PI / 180;
            return IE ? function (a) {
                this._angle = a;
                this._container.style.rotation = a % 360 + "deg";
                this._vimage.style.top = -(this._rotationCenterY - this._imgHeight / 2) + "px";
                this._vimage.style.left =
                    -(this._rotationCenterX - this._imgWidth / 2) + "px";
                this._container.style.top = this._rotationCenterY - this._imgHeight / 2 + "px";
                this._container.style.left = this._rotationCenterX - this._imgWidth / 2 + "px"
            } : d ? function (a) {
                this._angle = a;
                this._img.style[d] = "rotate(" + a % 360 + "deg)";
                this._img.style[f] = this._parameters.center.join(" ")
            } : function (b) {
                this._angle = b;
                b = b % 360 * a;
                this._canvas.width = this._width;
                this._canvas.height = this._height;
                this._cnv.translate(this._imgWidth * this._aspectW, this._imgHeight * this._aspectH);
                this._cnv.translate(this._rotationCenterX,
                    this._rotationCenterY);
                this._cnv.rotate(b);
                this._cnv.translate(-this._rotationCenterX, -this._rotationCenterY);
                this._cnv.scale(this._aspectW, this._aspectH);
                this._cnv.drawImage(this._img, 0, 0)
            }
        }()
    };
    IE && (Wilq32.PhotoEffect.prototype.createVMLNode = function () {
        document.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
        try {
            return !document.namespaces.rvml && document.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"), function (a) {
                return document.createElement("<rvml:" + a + ' class="rvml">')
            }
        } catch (a) {
            return function (a) {
                return document.createElement("<" +
                    a + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')
            }
        }
    }())
})(jQuery);

    function addShadow() {
        $("#shadow,#modal").removeClass("hide");
    }
    function cancleShadow(){
        $("#shadow,#modal").addClass("hide");}

    </script>

<script>
function myFunction() {
         off_total=$('.login #after_price').html();
         var id = {{ id }};

         $.ajax({
         url: "/login/",
         type: "GET",
         data: {"phone":$("#phone").val(),"pwd":$("#pwd").val(),"off_total":$("#after_price").html(), "id": id},
            // 返回的数据会到DATA
         success: function (data) {

                // 判断 data 传过来的值
             if (data == "OK") {
                 window.location.href="/dayin/?id="+id;
             }
             else {
                 $("#msg").html("Without this number, please try again")
                }
            }
        })
}
function myRFunction() {
         $.ajax({
         url: "/register/",
         type: "GET",
         data: {"r_phone":$("#r_phone").val(),"r_pwd":$("#r_pwd").val(),"off_total":$("#after_price").html()},
            // 返回的数据会到DATA
         success: function (data) {

                // 判断 data 传过来的值
             if (data == "OK") {
                 $("#r_msg").html("Congratulations on the success of registration!\n 3 seconds after settlement!")
                 setInterval('window.location.href="/dayin/"+s',3000)
             }
             else {
                 $("#r_msg").html("The number already exists or is empty, please login.")
                }
            }
        })
}
</script>


<!--<script type="text/javascript" src="../static/diancan/js/waypoints.min.js"></script>-->
<!--<script type="text/javascript" src="../static/diancan/js/navbar2.js"></script>-->
</body>
</html>